import Cookies from 'js-cookie'

const TokenKey = 'Admin-Token'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

export function devGetToken() {
  return Cookies.get('token')
}

export function devSetToken(token) {
  return Cookies.set('token', token)
}

export function devRemoveToken() {
  return Cookies.remove('token')
}

export function devGetId() {
  return Cookies.get('id')
}

export function devSetId(id) {
  return Cookies.set('id', id)
}

export function devRemoveId() {
  return Cookies.remove('id')
}

export function devSetName(name) {
  return Cookies.set('name', name)
}

export function devGetName() {
  return Cookies.get('name')
}

//商品列表缓存分类
export function devSetCategory(classId) {
  return Cookies.set('classId', classId)
}

export function devGetCategory() {
  return Cookies.get('classId')
}


